package com.wuming.house.service.impl;


import com.wuming.house.dao.FunctionMapper;
import com.wuming.house.model.Function;
import com.wuming.house.service.FunctionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author xuhuai
 * @createTime 2019/9/10 17:31
 * @Description:
 */
@Service
public class FunctionServiceImpl implements FunctionService {

    @Autowired
    private FunctionMapper functionMapper;

    @Override
    public void modifyFunction(Function function) {
        functionMapper.updateByPrimaryKey(function);
    }

    @Override
    public Function getFunctionById(Long id) {
        return functionMapper.selectByPrimaryKey(id);
    }

    @Override
    public void saveFunction(Function function) {
        functionMapper.insert(function);
    }
}
